package com.ctshk.rpc.insurance.service;


import com.ctshk.common.model.PageResponse;
import com.ctshk.rpc.insurance.dto.*;
import com.ctshk.rpc.insurance.req.*;
import com.ctshk.rpc.insurance.req.tp.CancelReq;
import com.ctshk.rpc.insurance.req.tp.OfferReq;

import java.util.List;

/**
 * <p>
 * 保险资源 服务类
 * </p>
 *
 * @author wangcy
 * @since 2021-01-26
 */
public interface IInsuranceService {

    PageResponse<InsuranceProductDTO> queryList(InsuranceProductReq insuranceProductReq);

    PageResponse<InsuranceGroupPageDTO> queryGroupList(InsuranceGroupPageReq insuranceGroupPageReq);

    List<InsuranceBusinessPageDTO> queryBusinessList(InsuranceBusinessPageReq insuranceBusinessPageReq, Long userId);

    void batchUpdateStatus(InsuranceStatusReq req);

    InsuranceDTO detail(Long id);

    void updateDetail(InsuranceReq insuranceReq);

    /**
     * 根据业务类型查询保险资源
     *
     * @param applicableService
     * @return
     */
    List<InsuranceDTO> queryInsuranceDTO(String applicableService);


    /**
     * 根据业务类型查询保险产品
     *
     * @param applicableService
     * @return
     */
    List<InsurancePrdDTO> queryInsurancePrdDTO(String applicableService);

    /**
     * 承保接口
     *
     * @param insuranceUnderwritingReq
     * @return
     * @throws Exception
     */
    InsuranceInsuredDTO sendProposalContent(InsuranceUnderwritingReq insuranceUnderwritingReq) throws Exception;


    /**
     * 报价接口
     *
     * @param offerReq
     * @return
     * @throws Exception
     */
    OfferDTO acciQuotation(OfferReq offerReq) throws Exception;


    /**
     * 退保接口
     *
     * @param cancelReq
     * @return
     * @throws Exception
     */
    List<CancelDTO> policyCancel(List<CancelReq> cancelReq) throws Exception;


}
